package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallBaowen;
import com.appkubes.mall.core.po.MallBaowenExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallBaowenMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallBaowenSqlProvider.class, method="countByExample")
    long countByExample(MallBaowenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallBaowenSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallBaowenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_baowen",
        "where baowen_key = #{baowenKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String baowenKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_baowen (baowen_key, app_key, ",
        "out_trade_no, transaction_id, ",
        "add_time, version, ",
        "xml)",
        "values (#{baowenKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{outTradeNo,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, ",
        "#{addTime,jdbcType=INTEGER}, #{version,jdbcType=INTEGER}, ",
        "#{xml,jdbcType=LONGVARCHAR})"
    })
    int insert(MallBaowen record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallBaowenSqlProvider.class, method="insertSelective")
    int insertSelective(MallBaowen record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallBaowenSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="baowen_key", property="baowenKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="addTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="xml", property="xml", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallBaowen> selectByExampleWithBLOBsWithRowbounds(MallBaowenExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallBaowenSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="baowen_key", property="baowenKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="addTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="xml", property="xml", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallBaowen> selectByExampleWithBLOBs(MallBaowenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallBaowenSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="baowen_key", property="baowenKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="addTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallBaowen> selectByExampleWithRowbounds(MallBaowenExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallBaowenSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="baowen_key", property="baowenKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="addTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallBaowen> selectByExample(MallBaowenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "baowen_key, app_key, out_trade_no, transaction_id, add_time, version, xml",
        "from mall_baowen",
        "where baowen_key = #{baowenKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="baowen_key", property="baowenKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="transaction_id", property="transactionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="addTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="xml", property="xml", jdbcType=JdbcType.LONGVARCHAR)
    })
    MallBaowen selectByPrimaryKey(String baowenKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallBaowenSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallBaowen record, @Param("example") MallBaowenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallBaowenSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") MallBaowen record, @Param("example") MallBaowenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallBaowenSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallBaowen record, @Param("example") MallBaowenExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallBaowenSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallBaowen record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @Update({
        "update mall_baowen",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "out_trade_no = #{outTradeNo,jdbcType=VARCHAR},",
          "transaction_id = #{transactionId,jdbcType=VARCHAR},",
          "add_time = #{addTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER},",
          "xml = #{xml,jdbcType=LONGVARCHAR}",
        "where baowen_key = #{baowenKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(MallBaowen record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_baowen
     *
     * @mbg.generated
     */
    @Update({
        "update mall_baowen",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "out_trade_no = #{outTradeNo,jdbcType=VARCHAR},",
          "transaction_id = #{transactionId,jdbcType=VARCHAR},",
          "add_time = #{addTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where baowen_key = #{baowenKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallBaowen record);
}